package com.zt.action.sys;

import java.util.Map;

import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.zt.service.sys.impl.LoginService;

public class LoginAction extends ActionSupport implements RequestAware,
		SessionAware {

	// 注入类
	private LoginService loginService;

	// 注入 session request
	private Map session;
	private Map request;

	public String username;

	public String execute() {
		this.setUsername(loginService.findUserByName(""));
		return "success";
	}

	// getters and setters
	public Map getSession() {
		return session;
	}

	public void setSession(Map session) {
		this.session = session;
	}

	public Map getRequest() {
		return request;
	}

	public void setRequest(Map request) {
		this.request = request;
	}

	public LoginService getLoginService() {
		return loginService;
	}

	public void setLoginService(LoginService loginService) {
		this.loginService = loginService;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

}
